<template>
	<div>
		<!--<el-dialog title="报价单维护" v-model="comFormShows" size="large">-->
			<el-row :gutter="24">
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">投保起始日:</p>
				</el-col>
				<el-col :span="4">
					<el-date-picker size="small" style="width: 100%;" v-model="startDate" format="yyyy-MM-dd" placeholder="开始时间">
					</el-date-picker>
				</el-col>
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">投保结束日:</p>
				</el-col>
				<el-col :span="4">
					<el-date-picker size="small" style="width: 100%;" v-model="stopDate" format="yyyy-MM-dd" placeholder="结束时间">
					</el-date-picker>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<!--<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">保险类型:</p>
				</el-col>
				<el-col :span="4">
					<el-select size="small" style="width: 100%;" v-model="insureType" placeholder="" clearable>
						<el-option label="新保" value="sb"></el-option>
						<el-option label="续保" value="xb"></el-option>
					</el-select>
				</el-col>-->
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">投保起始日:</p>
				</el-col>
				<el-col :span="4">
					<el-date-picker size="small" style="width: 100%;" v-model="insuranceStartDate" format="yyyy-MM-dd" placeholder="">
					</el-date-picker>
				</el-col>
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">保险公司:</p>
				</el-col>
				<el-col :span="4">
					<el-select size="small" v-model="insuranceCompanyId" placeholder="">
						<el-option v-for="item in companyCombo" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-card class="box-carda">
						<el-form :model="infoData" ref="comForm" :rules="Rule" label-width="150px">
							<el-col :span="6">
								<el-form-item label="被保险人：" prop="insured">
									<el-input size="small" v-model="infoData.insured"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="被保险人身份证：" prop="insuredIdNumber">
									<el-input size="small" v-model="infoData.insuredIdNumber"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="被保险人地址：" prop="insuredAddress">
									<el-input size="small" v-model="infoData.insuredAddress"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="邮编：" prop="postCode">
									<el-input size="small" v-model="infoData.postCode"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="联系人：" prop="contactName">
									<el-input size="small" v-model="infoData.contactName"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="联系电话：" prop="contactPhone">
									<el-input size="small" v-model="infoData.contactPhone"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="E_mail：" prop="email">
									<el-input size="small" v-model="infoData.email"></el-input>
								</el-form-item>
							</el-col>

							<el-col :span="6">
								<el-form-item label="车牌号：" prop="plateNum">
									<el-input size="small" v-model="infoData.plateNum" readonly></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="车型：" prop="carModel">
									<el-input placeholder="请选择车型" size="small" icon="search" v-model="infoData.carModel" :on-icon-click="chooseSearchModel"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="发动机号：" prop="engineNum">
									<el-input size="small" v-model="infoData.engineNum"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="车架号：" prop="vin">
									<el-input size="small" v-model="infoData.vin" readonly></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="发动机类型：" prop="carType">
									<el-input size="small" v-model="infoData.carType"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="排量/功率：" prop="power">
									<el-input size="small" v-model="infoData.power"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="载客/载重量：" prop="passengerWeight">
									<el-input size="small" v-model="infoData.passengerWeight"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="使用性质：" prop="useProperty">
									<el-input size="small" v-model="infoData.useProperty"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="行驶证车主：" prop="driverLicense">
									<el-input size="small" v-model="infoData.driverLicense"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="初次登记日期：" prop="firstRecordDate">
									<el-input size="small" v-model="infoData.firstRecordDate"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="6">
								<el-form-item label="实际价值：" prop="realValue">
									<el-input size="small" v-model="infoData.realValue"></el-input>
								</el-form-item>
							</el-col>
						</el-form>
					</el-card>
				</el-col>
			</el-row>
			<el-row>
				<div class="table-d">
					<table width="100%" border="0" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;">
						<tr>
							<td colspan="6"><b style="text-align: center;">保险报价单  </b></td>
						</tr>
						<tr>
							<td><b>投保险种  </b></td>
							<td><b>保额/限额 </b></td>
							<td><b>保险费  </b></td>
							<td><b>投保险种  </b></td>
							<!--<td><b>保额/限额  </b></td>-->
							<td><b>保险费  </b></td>
						</tr>
						<tr>
							<td rowspan="2">
								<el-checkbox v-model="intem[0].starts">交强险</el-checkbox>
							</td>

							<td>
								<!--<input v-model="intem[0].limit" class='table_input' readonly></el-input>-->
							</td>
							<td>车船使用税：<input v-model="intem[0].price" v-on:blur='sumPrice' style="width: 50%;border-style:none;outline:medium;">
							</td>
							<td rowspan="2">
								<el-checkbox v-model="intem[7].starts">发动机涉水险</el-checkbox>
							</td>
							<!--<td><input v-model="intem[7].limit" class='table_input'></td>-->
							<td rowspan="2"><input v-model="intem[7].price" class='table_input'></td>
						</tr>
						<tr>
							<td></td>
							<td>保&nbsp;&nbsp;&nbsp;险&nbsp;&nbsp;&nbsp;费：<input v-model="intem[17].price" v-on:blur='sumPrice' style="width: 50%;border-style:none;outline:medium;"></td>
						</tr>
						<tr>
							<td>
								<el-checkbox v-model="intem[1].starts">车辆损失险</el-checkbox>
							</td>
							<td>
								<!--<input v-model="intem[1].limit" class='table_input'>-->
							</td>
							<td><input v-model="intem[1].price" class='table_input' v-on:blur='sumPrice'></td>
							<td>
								<el-checkbox v-model="intem[8].starts">自燃损失险</el-checkbox>
							</td>
							<!--<td><input v-model="intem[8].limit" class='table_input'></td>-->
							<td><input v-model="intem[8].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td rowspan="3">
								<el-checkbox v-model="intem[2].starts">第三者责任险</el-checkbox>
							</td>
							<td rowspan="3">
								<el-radio-group v-model="intem[2].limit">
									<el-radio label="5万" key="50000">5万</el-radio>
									<el-radio label="10万" key="100000">10万</el-radio><br/>
									<el-radio label="15万" key="150000">15万</el-radio>
									<el-radio label="20万" key="200000">20万</el-radio><br/>
									<el-radio label="30万" key="300000">30万</el-radio>
									<el-radio label="50万" key="500000">50万</el-radio><br/>
									<el-radio label="100万" key="1000000">100万</el-radio>
								</el-radio-group>
							</td>
							<td rowspan="3"><input v-model="intem[2].price" class='table_input' v-on:blur='sumPrice'></td>
							<td rowspan="1">
								<el-checkbox v-model="intem[9].starts">机动车损失保险无法找到第三方特约险</el-checkbox>
							</td>
							<!--<td rowspan="1"><input v-model="intem[9].limit" class='table_input'></td>-->
							<td rowspan="1"><input v-model="intem[9].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td rowspan="1">
								<el-checkbox v-model="intem[10].starts">延长保修4年/12万</el-checkbox>
							</td>
							<!--<td rowspan="1"><input v-model="intem[10].limit" class='table_input'></td>-->
							<td rowspan="1"><input v-model="intem[10].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td rowspan="1">
								<el-checkbox v-model="intem[11].starts">延长保修6年/16万</el-checkbox>
							</td>
							<!--<td rowspan="1"><input v-model="intem[11].limit" class='table_input'></td>-->
							<td rowspan="1"><input v-model="intem[11].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td>
								<el-checkbox v-model="intem[3].starts">盗抢险</el-checkbox>
							</td>
							<td>
								<!--<input v-model="intem[3].limit" class='table_input'>-->
							</td>
							<td><input v-model="intem[3].price" class='table_input' v-on:blur='sumPrice'></td>
							<td>
								<el-checkbox v-model="intem[12].starts">续保手册(注：赠送8000礼包)</el-checkbox>
							</td>
							<!--<td><input v-model="intem[12].limit" class='table_input'></td>-->
							<td><input v-model="intem[12].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td rowspan="2">
								<el-checkbox v-model="intem[4].starts">车上人员责任险</el-checkbox>
							</td>
							<td>司机：<input v-model="intem[4].limit" style="width: 50%;border-style:none;outline:medium;">万
							</td>
							<td><input v-model="intem[4].price" class='table_input' v-on:blur='sumPrice'></td>
							<td rowspan="2">
								<el-checkbox v-model="intem[13].starts">不计免赔</el-checkbox>
							</td>
							<!--<td rowspan="2"><input v-model="intem[13].limit" class='table_input'></td>-->
							<td rowspan="2"><input v-model="intem[13].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td>乘客：<input v-model="intem[16].limit" style="width: 50%;border-style:none;outline:medium;">万</td>
							<td><input v-model="intem[16].price" class='table_input'></td>
						</tr>
						<tr>
							<td>
								<el-checkbox v-model="intem[5].starts">玻璃单独玻璃险</el-checkbox>
							</td>
							<td>
								<!--<input v-model="intem[5].limit" class='table_input'>-->
							</td>
							<td><input v-model="intem[5].price" class='table_input' v-on:blur='sumPrice'></td>
							<td>
								<el-checkbox v-model="intem[14].starts">车身划痕险</el-checkbox>
							</td>
							<!--<td><input v-model="intem[14].limit" class='table_input'></td>-->
							<td><input v-model="intem[14].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
						<tr>
							<td>
								<el-checkbox v-model="intem[6].starts">润华玻璃险</el-checkbox>
							</td>
							<td>
								<!--<input v-model="intem[6].limit" class='table_input'>-->
							</td>
							<td><input v-model="intem[6].price" class='table_input' v-on:blur='sumPrice'></td>
							<td>
								<el-checkbox v-model="intem[15].starts">润华划痕险</el-checkbox>
							</td>
							<!--<td><input v-model="intem[15].limit" class='table_input'></td>-->
							<td><input v-model="intem[15].price" class='table_input' v-on:blur='sumPrice'></td>
						</tr>
					</table>
				</div>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">交强险价格:</p>
				</el-col>
				<el-col :span="4" style="padding-top: 5px;">
					<span>{{jqxbj}}￥</span>
				</el-col>
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">商业险价格:</p>
				</el-col>
				<el-col :span="4" style="padding-top: 5px;">
					<span>{{syxbj}}￥</span>
				</el-col>
				<el-col :span="2" style="margin-right:10px;">
					<p class="queryLabel">合计:</p>
				</el-col>
				<el-col :span="4" style="padding-top: 5px;">
					<span>{{sum}}￥</span>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<!--<el-col :span="5" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='sumPrice'>计算价格</el-button>
				</el-col>-->
				<el-col :span="3" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='comFormShowsClose'>关闭窗口</el-button>
				</el-col>
				<el-col :span="3" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='qqClick'>报价请求单</el-button>
				</el-col>
				<el-col :span="3" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='xyClick'>生成短信模板</el-button>
				</el-col>
				<el-col :span="3" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='comFormShowsSure'>保存</el-button>
				</el-col>
			</el-row>
		<!--</el-dialog>-->
		<el-dialog title="选择车型" v-model="searchCarShow" size="small">
			<el-row :gutter="24">
				<el-col :span="11" style="margin-left:5px;">
				</el-col>
				<el-col :span="24" style="margin-left:5px;">
					<div style="height: 3em;"></div>
				</el-col>
				<el-col :span="24" style="margin-left:5px; height: 250px;overflow: scroll;">
					<el-tree :data="SearchTreeData" :filter-node-method="filterNode" :highlight-current=true :props="defaultProps" accordion @node-click="searchNodeClick" :auto-expand-parent=false node-key="id"></el-tree>
				</el-col>
			</el-row>

			<div slot="footer" class="dialog-footer">
				<el-button @click="searchCarShow = false">取 消</el-button>
				<el-button type="primary" @click="serchSaveCar">提 交</el-button>
			</div>
		</el-dialog>
		<el-dialog title="报价请求单" v-model="qqShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="qqFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="qqText">
								<el-input size="small" v-model="qqFromData.qqText" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='copyQQ'>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='qqShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价响应单" v-model="xyShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="xyText">
								<el-input size="small" v-model="xyFromData.xyText" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click=''>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button type="primary" size="small" v-on:click='xyShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="价格确认" v-model="sureShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="100px">
						<el-col :span="24">
							<el-form-item label="交强险价格:" prop="">
								<span>{{jqxbj}} 元</span>
							</el-form-item>
						</el-col>
						<el-col :span="24">
							<el-form-item label="商业险价格:" prop="">
								<span>{{syxbj}} 元</span>
							</el-form-item>
						</el-col>
						<el-col :span="24">
							<el-form-item label="合计:" prop="">
								<span>{{sum}} 元</span>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" size="small" v-on:click='saveEdit'>确认</el-button>
					<el-button size="small" v-on:click='sureShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价预警" v-model="yujingShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<span>{{yujingMsg}}</span>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" size="small" v-on:click='yujingSave'>确认</el-button>
					<el-button size="small" v-on:click='yujingShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
	</div>
</template>

<script>
	import moment from 'moment'
	export default {
		data: function() {
			return {
				//报价单数据开始
				//
				//
				//上次保单信息
				startDate:'',
				stopDate:'',
				TXMsg: {
					insuranceCar: {
						insured: '',
						InsuredAddress: '',
						InsuredIdNumber: '',
						postCode: '',
						contactName: '',
						contactPhone: '',
						email: '',
						plateNum: '',
						carValue: '',
						carLevel: '',
						engineNum: '',
						vin: '',
						power: '',
						passengerWeight: '',
						useProperty: '',
						driverLicense: '',
						firstRecordDate: '',
						realValue: '',
					},
					paramQuotation: {
						carId: '',
						commercialinsuranceTotal: '',
						compulsoryTotal: '',
						contactPeople: '',
						contactPhone: '',
						insuranceCompanyId: '',
						insuranceStartDate: '',
						insureType: '',
					},
					itemList: [],
				},
				insureType: '',
				insuranceStartDate: '',
				insuranceCompanyId: '',
				companyCombo: [],
				yujingMsg: '',
				yujingShow: false,
				sureShow: false,
				xyShow: false,
				qqShow: false,
				//报价单维护界面显示
				comFormShows: this.comFormShows,
				//选择车型界面显示
				searchCarShow: false,
				//搜索的车型数据
				SearchTreeData: [],
				//树型数据配置
				defaultProps: {
					children: 'child',
					label: 'label',
				},
				searhcarType: '',
				searchdatavale: '',
				searchdatalabel: '',
				insPrice: 0,
				jqxbj: "",
				syxbj: "",
				sum: '',
				qqFromData: {
					qqText: ""
				},
				xyFromData: {
					xyText: ""
				},
				//校验规则
				Rule: {
					insuredIdNumber: [{
						required: true,
						message: '请输入被保险人身份证',
						trigger: 'blur'
					}],
					insured: [{
						required: true,
						message: '请输入被保险人',
						trigger: 'blur'
					}],
					insuredAddress: [{
						required: true,
						message: '请输入被保险人地址',
						trigger: 'blur'
					}],
					postCode: [{
						required: true,
						message: '请输入邮编',
						trigger: 'blur'
					}],
					contactName: [{
						required: true,
						message: '请输入联系人',
						trigger: 'blur'
					}],
					contactPhone: [{
						required: true,
						message: '请输入联系电话',
						trigger: 'blur'
					}],
					email: [{
						required: true,
						message: '请输入email',
						trigger: 'blur'
					}],
					carModel: [{
						required: true,
						message: '请选择车型',
						trigger: 'blur'
					}],
					engineNum: [{
						required: true,
						message: '请输入发动机号',
						trigger: 'blur'
					}],
					driverLicense: [{
						required: true,
						message: '请输入行驶证车主',
						trigger: 'blur'
					}],
					firstRecordDate: [{
						required: true,
						message: '请选择初次登记日期',
						trigger: 'blur'
					}],

				},
				infoData: { //点击设置进来查出的数据
					insured: "",
					compulsoryTotal: "",
					insuredIdNumber: "",
					carType: "",
					useProperty: "",
					commercialinsuranceTotal: "",
					driverLicense: "",
					vin: "",
					id: "",
					ower: "",
					email: "",
					passengerWeight: "",
					contactName: "",
					engineNum: "",
					updateUser: "",
					updateTime: "",
					firstRecordDate: "",
					plateNum: "",
					insuranceStopDate: "",
					carAge: "",
					realValue: "",
					companyId: "",
					createTime: "",
					createUser: "",
					postCode: "",
					insuredAddress: "",
					contactPhone: "",
					insuranceStartDate: "",
					//					carModel: "",
					carLevel: '',
					carValue: '',
				},
				intem: [{
						name: "交强险-车船使用税",
						type: 0,
						limit: "",
						price: "",
						id: 0,
						starts: false,
					}, {
						name: "车辆损失险",
						type: 1,
						limit: "",
						price: "",
						id: 1,
						starts: false,
					}, {
						name: "第三者责任险",
						type: 1,
						limit: "",
						price: "",
						id: 2,
						starts: false,
					}, {
						name: "盗抢险",
						type: 1,
						limit: "",
						price: "",
						id: 3,
						starts: false,
					}, {
						name: "车上人员责任险-司机",
						type: 1,
						limit: "",
						price: "",
						id: 4,
						starts: false,
					}, {
						name: "单独玻璃险",
						type: 1,
						limit: "",
						price: "",
						id: 5,
						starts: false,
					}, {
						name: "润华玻璃险",
						type: 1,
						limit: "",
						price: "",
						id: 6,
						starts: false,
					}, {
						name: "发动机涉水险",
						type: 1,
						limit: "",
						price: "",
						id: 7,
						starts: false,
					}, {
						name: "无法找到第三方",
						type: 1,
						limit: "",
						price: "",
						id: 8,
						starts: false,
					}, {
						name: "延长保修4年",
						type: 1,
						limit: "",
						price: "",
						id: 9,
						starts: false,
					}, {
						name: "延长保修6",
						type: 1,
						limit: "",
						price: "",
						id: 10,
						starts: false,
					}, {
						name: "续保手册",
						type: 1,
						limit: "",
						price: "",
						id: 11,
						starts: false,
					}, {
						name: "不计免赔",
						type: 1,
						limit: "",
						price: "",
						id: 12,
						starts: false,
					}, {
						name: "车身划痕险",
						type: 1,
						limit: "",
						price: "",
						id: 13,
						starts: false,
					}, {
						name: "润华划痕险",
						type: 1,
						limit: "",
						price: "",
						id: 14,
						starts: false,
					}, {
						name: "润华划痕险",
						type: 1,
						limit: "",
						price: "",
						id: 15,
						starts: false,
					}, {
						name: "车上人员责任险-乘客",
						type: 1,
						limit: "",
						price: "",
						id: 16,
						starts: false,
					}, {
						name: "交强险-保险费",
						type: 0,
						limit: "",
						price: "",
						id: 17,
						starts: false,
					}

				],
				contentMsg: '',
				//
				//
				//报价单数据结束
			}
		},
		props: {
			//vin
			vin: "",
			comFormShows: false,
			rowData: null,
			selectStatus: '',
			checkData: '',
		},
		watch: {
			vin: function(vin) {
				debugger;
				//				/alert("j");
				this.query();
			},
			comFormShows: function(start) {
				debugger;
				if(!start) {
					this.$emit('close');
				}
			},
			contentMsg: function(msg) {
				if(!msg) {
					this.$emit('message', this.$data.contentMsg)
				}
			},
		},
		methods: {
			//没用到的回调函数
			refresh: function() {
				//this.queryTaskGrid();
			},
			query: function() {
				//新增报价单
				if(this.selectStatus == "add") {
					this.$http({
						method: 'GET',
						url: this.API_ROOT + '/insurance/task/latelyInsurance', //url
						params: { //发送的参数
							vin: this.rowData.vin,
						}
					}).then(function(resp) {
						debugger;
						if(resp.data.data.compulsoryStartDate&&resp.data.data.compulsoryEndDate){
							this.$data.startDate=moment(resp.data.data.compulsoryStartDate).format("YYYY-MM-DD");
							this.$data.stopDate=moment(resp.data.data.compulsoryEndDate).format("YYYY-MM-DD");
						}else{
							this.$data.startDate=moment(resp.data.data.contractstartinsurance).format("YYYY-MM-DD");
							this.$data.stopDate=moment(resp.data.data.contractstopinsurance).format("YYYY-MM-DD");
						}
					}, function(error) {
						// error
					});
					//请求车辆及客户信息系
					this.$http.get(this.API_ROOT + '/insurance/car/carInfo', {
						params: {
							id: this.rowData.carId
						}
					}).then((response) => {
						debugger;
						this.$data.infoData = Object.assign(this.$data.infoData, response.data.data);
						this.$data.infoData.insuredIdNumber = response.data.data.insuredIDNumber;
					}, (response) => {});
				} else if(this.selectStatus == "edit") {
					//修改报价单
					//				this.$data.intem[0].starts=true;
					this.$http({
						method: 'GET',
						url: this.API_ROOT + '/insurance/task/latelyInsurance', //url
						params: { //发送的参数
							vin: this.rowData.vin,
						}
					}).then(function(resp) {
						debugger;
						if(resp.data.data.compulsoryStartDate&&resp.data.data.compulsoryEndDate){
							this.$data.startDate=moment(resp.data.data.compulsoryStartDate).format("YYYY-MM-DD");
							this.$data.stopDate=moment(resp.data.data.compulsoryEndDate).format("YYYY-MM-DD");
						}else{
							this.$data.startDate=moment(resp.data.data.contractstartinsurance).format("YYYY-MM-DD");
							this.$data.stopDate=moment(resp.data.data.contractstopinsurance).format("YYYY-MM-DD");
						}
					}, function(error) {
						// error
					});
					this.$data.insureType = this.checkData.insureType;
					this.$data.insuranceStartDate = this.checkData.insuranceStartDate;
					this.$data.insuranceCompanyId = this.checkData.insuranceCompanyId;
					this.$data.comFormShows = true;
					this.intemInfo(); //请求已经选中的报价单项目
					//					this.itmeQuerySy();
					//					this.itmeQueryJq();
					//获取选择的对象

					//请求车辆及客户信息系
					this.$http.get(this.API_ROOT + '/insurance/car/carInfo', {
						params: {
							id: this.rowData.carId
						}
					}).then((response) => {
						debugger;
						this.$data.infoData = Object.assign(this.$data.infoData, response.data.data);
						this.$data.infoData.insuredIdNumber = response.data.data.insuredIDNumber;
						//this.$data.orderFromData.payPeople = response.data.data.insured;
					}, (response) => {
						debugger;
					});
					//请求车辆及客户信息系
					this.$http.get(this.API_ROOT + '/insurance/car/carInfo', {
						params: {
							id: this.rowData.carId
						}
					}).then((response) => {
						debugger;
						this.$data.infoData = Object.assign(this.$data.infoData, response.data.data);
						this.$data.infoData.insuredIdNumber = response.data.data.insuredIDNumber;
					}, (response) => {});
					//请求保险项目
					this.$http.get(this.API_ROOT + '/insurance/QuotationItem/QuotationItemList', {
						params: {
							id: this.checkData.id
						}
					}).then((response) => {
						debugger;
						console.log(JSON.stringify(response.data))
						this.$data.infoData = Object.assign(this.$data.infoData, response.data[0]);
					}, (response) => {
						debugger;
					});
				}

			},
			//请求已经选中的报价单项目
			intemInfo: function() {
				//debugger;
				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
					params: {
						id: this.checkData.id
					}
				}).then((response) => {
					debugger;
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					}

					var respData = response.data
					for(var i = 0; i < respData.length; i++) {
						for(var j = 0; j < this.$data.intem.length; j++) {
							if(this.$data.intem[j].id == respData[i].itemId) {
								this.$data.intem[j].starts = true;
								this.$data.intem[j].limit = respData[i].itemLimit;
								this.$data.intem[j].price = respData[i].itemPrice;
								break;
							}

						}
					}
					this.sumPrice();
				}, (response) => {
					debugger;
				});
			},
			//查询报价单项目sy商业
			itmeQuerySy: function() {
				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
					params: {
						type: 1,
						id: this.checkData.id
					}
				}).then((response) => {
					debugger;
					this.$data.tableDatasy.dataList = response.data;
				}, (response) => {
					debugger;
				});

			},
			//			//查询报价单项目jq交强
			//			itmeQueryJq: function() {
			//				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
			//					params: {
			//						type: 0,
			//						id: this.$data.checkData.id
			//					}
			//				}).then((response) => {
			//					debugger;
			//					this.$data.tableDatajq.dataList = response.data;
			//				}, (response) => {
			//					debugger;
			//				});
			//			},

			//报价单方法开始
			//↓↓↓
			//计算价格
			sumPrice: function() {
				//				compulsoryTotal 交强 险总价
				//              commercialinsuranceTotal 商业险总价
				//总价格
				debugger;
				var sumPrice = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true && this.$data.intem[i].price != "") {
						this.$data.intem[i].price = Number(this.$data.intem[i].price);
						if(i == 0) {
							debugger;
							this.$data.intem[17].starts = true;
							sumPrice = sumPrice + (this.$data.intem[i].price);
						} else if(i == 2) {
							debugger;
							sumPrice = sumPrice + this.$data.intem[i].price;
						} else if(i == 4) {
							debugger;
							this.$data.intem[16].starts = true;
							sumPrice = sumPrice + (this.$data.intem[i].price);
						} else {
							debugger;
							sumPrice = sumPrice + this.$data.intem[i].price;
						}
					}
				}
				debugger;
				this.$data.jqxbj = (Number(this.$data.intem[0].price) + Number(this.$data.intem[17].price)).toFixed(2);
				this.$data.syxbj = Number(sumPrice - this.$data.jqxbj).toFixed(2);
				this.$data.sum = Number(this.$data.jqxbj) + Number(this.$data.syxbj);
				//this.$data.orderFromData.commercialinsurancePrice = Number(this.$data.syxbj).toFixed(2); //商业
				//this.$data.orderFromData.compulsoryPrice = Number(this.$data.jqxbj).toFixed(2); //交强
				this.$data.infoData.commercialinsuranceTotal = Number(this.$data.syxbj).toFixed(2); //update的时候
				this.$data.infoData.compulsoryTotal = Number(this.$data.jqxbj).toFixed(2);
			},
			//打开搜索的车型选择
			chooseSearchModel: function() {
				this.$data.searchCarShow = true;
			},
			//资源过滤
			filterNode: function(value, data, node) {
				if(!value) return true;
				return data.label.indexOf(value) !== -1;
			},
			//点击搜索的资源树节点
			searchNodeClick: function(data) {
				debugger;
				this.$data.infoData.carValue = '';
				this.$data.infoData.carLevel = '';
				//				
				this.$data.searhcarType = data.type;
				this.$data.searchdatalabel = data.label;
				this.$data.searchdatavale = data.value;
				this.$data.infoData.carLevel = data.type;
				this.$data.infoData.carValue = data.value;
			},
			//搜索确认车型
			serchSaveCar: function() {
				debugger;
				this.$data.infoData.carModel = '';
				if(this.$data.searhcarType == '2') {
					this.$data.infoData.carModel = this.$data.searchdatalabel;
				} else {
					this.$message("未选中车型");
				}
				this.$data.searchCarShow = false;
			},
			comFormShowsClose: function() {
				this.$confirm('此操作将丢失您输入的数据, 是否继续?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.comFormShows = false;
				}).catch(() => {

				});
			},
			//点击请求单
			qqClick: function() {
				debugger;
				var itemsName = "";
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsName += this.$data.intem[i].name + "(" + this.$data.intem[i].limit + "),";
						} else if(i == 4) {
							itemsName += this.$data.intem[i].name + "(司机：" + this.$data.intem[i].limit + "万 ，乘客：" + this.$data.intem[16].limit + "万),";
						} else {
							itemsName += this.$data.intem[i].name + ","
						}
					}
				}
				this.$data.qqFromData.qqText = "车牌号为" + this.$data.infoData.plateNum + ",车架号为" + this.$data.infoData.vin + "的车辆投保,项目包括" + itemsName + "请给予报价。"

				this.$data.qqShow = true;
			},
			//复制请求单
			copyQQ: function() {
				debugger;
				var copyText = this.$data.qqFromData.qqText;
				copy(copyText);
				//copy("copyText");
				//copyText.execCommand("copy");
			},
			//点击响应单
			xyClick: function() {
				//debugger;
				//响应单的内容组合
				var itemsNames = "";
				//总价格
				//var sumPrice=0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].limit + "),";
						} else if(i == 4) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						}else if(i == 16) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						} else {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
						}
					}
				};
				//调用价格计算
				this.sumPrice();
				debugger;
				this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
					"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) +
					"，合计：￥" + (parseFloat(this.$data.jqxbj) + parseFloat(this.$data.syxbj))
				this.$data.xyShow = true;
			},
			//确认价格之后再保存。
			comFormShowsSure: function() {
				this.$refs.comForm.validate(function(valid, $event) {
					// 验证通过
					if(valid) {
						debugger;
						var sum = 0;
						for(var i = 0; i < this.$data.intem.length; i++) {
							if(this.$data.intem[i].starts == true && this.$data.intem[i].price != "") {
								if(i == 0) {
									debugger;
									this.$data.intem[17].starts = true;
								} else if(i == 4) {
									debugger;
									this.$data.intem[16].starts = true;
								}
							}
							if(this.$data.intem[i].starts == false) {
								sum = sum + 0;
							} else {
								sum = sum + 1;
							}

						}
						if(sum == 0) {
							this.$message.error("请至少选择一条保险项目,并且填写保费");
							return false;
						} else {
							this.sureShow = true;
						}
					} else {
						return false
					}
				}.bind(this))

			},
			//保存报价单（点保存的时候要询问是否出单）
			saveEdit: function() {
				debugger;
				this.sureShow = false;
				//				if(this.saveItems()) {
				//报价检测
				this.$http.get(this.API_ROOT + '/insurance/Quotation/checkWarning', {
					params: {
						carId: this.rowData.carId,
						jqPrice: this.$data.jqxbj,
					}
				}).then(resp => {
					debugger;
					if(resp.data.success) {
						this.$data.infoData.insuranceStartDate = this.moment(this.$data.infoData.insuranceStartDate).format("YYYY-MM-DD");
						this.$data.infoData.insuranceStopDate = this.moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
						//items
						this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
						//this.saveCusInfo(); //保存车主以及车辆信息
						//insuranceCar
						this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
						this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.InsuredAddress;
						this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.InsuredIdNumber;
						this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
						this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
						this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
						this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
						this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
						this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
						this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
						this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
						this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
						this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
						this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
						this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
						this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
						this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
						this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
						//paramQuotation
						this.$data.TXMsg.paramQuotation.carId = this.checkData.carId;
						if(this.selectStatus == "add") {
							this.$data.TXMsg.paramQuotation.id = "";
						} else {
							this.$data.TXMsg.paramQuotation.id = this.checkData.id;
						}
						this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
						this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
						this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
						this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
						this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
						this.$data.TXMsg.paramQuotation.insuranceStartDate = this.$data.insuranceStartDate;
						this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;

						this.$http.post(this.API_ROOT + '/insurance/task/save', this.$data.TXMsg, { //更新报价单
							params: {
								taskId: this.checkData.id
							}
						}).then(resp => {
							if(resp.data.success) {
								this.$data.comFormShows = false;
								//debugger;
								//响应单的内容组合
								var itemsNames = "";
								//总价格
								//var sumPrice=0;
								debugger;
								for(var i = 0; i < this.$data.intem.length; i++) {
									if(this.$data.intem[i].starts == true) {
										if(i == 2) {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].limit + "),";
						} else if(i == 4) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						}else if(i == 16) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						} else {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
						}
									}
								};
								//调用价格计算
								this.sumPrice();
								debugger;
								this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
									"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) +
									"，合计：￥" + (parseFloat(this.$data.jqxbj) + parseFloat(this.$data.syxbj))
								this.$data.contentMsg = this.$data.xyFromData.xyText;
								this.message();
							} else {
								this.$message.error(resp.data.msg);
							}
						}, resp => {});

						//						this.$confirm('要出单吗?', '提示', { //出单询问
						//							confirmButtonText: '确定',
						//							cancelButtonText: '取消',
						//							type: 'warning'
						//						}).then(() => {
						//							this.outOrderfun(this.$data.checkData.qid, this.$data.checkData.id); //出单函数
						//						}).catch(() => {
						//							this.$message({
						//								type: 'info',
						//								message: '取消出单'
						//							});
						//						});
					} else {
						this.$data.yujingShow = true;
						this.$data.yujingMsg = resp.data.msg;
					}
				}, resp => {});

				//				}

			},
			//保存保险项目
			saveItems: function() {

				var items = [];
				var y = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					debugger;
					if(this.$data.intem[i].starts == true) { //第四项一个checkbox对应两个值
						if(i == 4) {
							items[y] = this.$data.intem[i];
							items[y + 1] = this.$data.intem[16];
							y = y + 2;
						} else if(i == 0) {
							items[y] = this.$data.intem[i];
							items[y + 1] = this.$data.intem[17];
							y = y + 2;
						} else {
							items[y] = this.$data.intem[i];
							y++;
						}
					}
				};
				return items;

				//				debugger;
				//				this.$http.post(this.API_ROOT + '/insurance/QuotationItem/save', items, {
				//					params: {
				//						QuotationId: this.$data.checkData.qid
				//					}
				//				}).then(resp => {
				//
				//					if(resp.data.success) {
				//						//						this.$message("项目保存成功");
				//					} else {
				//						//debugger;
				//						this.$message.error(resp.data.msg);
				//					}
				//				}, resp => {});
			},
			//保存报价单维护客户以及车辆信息
			saveCusInfo: function() {
				this.$http.post(this.API_ROOT + '/insurance/car/save', this.$data.infoData)
					.then(resp => {
						debugger;
						if(resp.data.success) {
							this.$message(resp.data.msg);
						} else {
							this.$message.error(resp.data.msg);
						}
					}, resp => {

					});
			},
			yujingSave: function() {
				this.$data.infoData.insuranceStartDate = this.moment(this.$data.infoData.insuranceStartDate).format("YYYY-MM-DD");
				this.$data.infoData.insuranceStopDate = this.moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
				//items
				this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
				//this.saveCusInfo(); //保存车主以及车辆信息
				//insuranceCar
				this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
				this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.InsuredAddress;
				this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.InsuredIdNumber;
				this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
				this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
				this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
				this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
				this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
				this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
				this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
				this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
				this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
				this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
				this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
				this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
				this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
				this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
				//paramQuotation
				this.$data.TXMsg.paramQuotation.carId = this.checkData.carId;
				if(this.selectStatus == "add") {
					this.$data.TXMsg.paramQuotation.id = "";
				} else {
					this.$data.TXMsg.paramQuotation.id = this.checkData.id;
				}
				this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
				this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
				this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
				this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
				this.$data.TXMsg.paramQuotation.insuranceStartDate = this.$data.insuranceStartDate;
				this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;

				this.$http.post(this.API_ROOT + '/insurance/task/save', this.$data.TXMsg, { //更新报价单
					params: {
						taskId: this.checkData.id
					}
				}).then(resp => {
					debugger;
					if(resp.data.success) {
						this.$data.yujingShow = false;
						this.$data.comFormShows = false;
						//debugger;
						//响应单的内容组合
						var itemsNames = "";
						//总价格
						//var sumPrice=0;
						for(var i = 0; i < this.$data.intem.length; i++) {
							if(this.$data.intem[i].starts == true) {
								if(i == 2) {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].limit + "),";
						} else if(i == 4) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						}else if(i == 16) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit +"万，保险费："+this.$data.intem[i].price+"元；";
						} else {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
						}
							}
						};
						//调用价格计算
						this.sumPrice();
						debugger;
						this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
							"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) +
							"，合计：￥" + (parseFloat(this.$data.jqxbj) + parseFloat(this.$data.syxbj))
						this.$data.contentMsg = this.$data.xyFromData.xyText;
						this.message();
					} else {
						this.$message.error(resp.data.msg);
					}
				}, resp => {});
			},

			//查询搜索的参数树
			querySearchTree: function() {
				//获取资源树
				debugger;
				this.$http.get(this.API_ROOT + '/base/car/tree', {}).then((response) => {
					this.$data.SearchTreeData = response.data;
				}, (response) => {});
			},
			message: function() {
				this.$emit('message', this.$data.contentMsg);
			},
			//↑↑↑
			//报价单方法结束
		},
		created: function() {
			this.query();
			this.querySearchTree();
			this.$http.get(this.API_ROOT + '/insurance/combo', {
				params: {}
			}).then((response) => {
				// success callback
				this.$data.companyCombo = response.data;
			}, (response) => {
				// error callback
			});
		}
	}
</script>

<style>
	.box-carda {
		width: 100%;
		height: 300px;
		margin-top: 20px;
		margin-bottom: 20px;
	}
	
	.box-card {
		width: 100%;
		height: 250px;
		margin-top: 20px;
		margin-bottom: 20px;
	}
	
	.box-cards {
		width: 100%;
		height: 200px;
		margin-top: 20px;
		margin-bottom: 20px;
	}
	
	.table_input {
		border-style: none;
		outline: medium;
		border-bottom: 1px solid #20a0ff!important;
		width: 100%;
		height: 100%;
	}
</style>